#ifndef CLICKBTN_H
#define CLICKBTN_H
#include<QPushButton>
#include"global.h"
#include<QVariant>

class ClickBtn:public QPushButton
{
    Q_OBJECT
public:
    ClickBtn(QWidget * parent = nullptr);
    void SetState(QString normal,QString hover,QString press);
private:
    void enterEvent(QEvent *event) override; // 鼠标进入
    void leaveEvent(QEvent *event) override;// 鼠标离开
    void mousePressEvent(QMouseEvent *event) override; // 鼠标按下
    void mouseReleaseEvent(QMouseEvent *event) override; // 鼠标释放
    void mouseEvent(QString state);
private:
    QString _normal;
    QString _hover;
    QString _press;
};

#endif // CLICKBTN_H
